package org.mappland.compltres.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.mappland.compltres.domain.Machine;

public interface MachineMapper extends BaseMapper<Machine> {

    // 预定机器
    @Update("update machine set state = 1 where id = #{machineId}")
    Boolean bookMachine(@Param("machineId") Integer machineId);

    // 释放机器
    @Update("update machine set state = 0 where id = #{machineId}")
    Boolean freeMachine(@Param("machineId") Integer machineId);
}
